<?php
class Company extends AppModel {

    public $recursive = -1;
    public $name = 'Company';
    public $validate = array(
        'name' => array('notempty'),
        'company_location_id' => array('numeric'),
        'company_industry_id' => array('numeric'),
        'company_type_id' => array('numeric')
    );

    //The Associations below have been created with all possible keys, those that are not needed can be removed
    public $belongsTo = array(
        'CompanyLocation' => array(
            'className' => 'CompanyLocation',
            'foreignKey' => 'company_location_id',
            'counterCache' => true,
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'CompanyIndustry' => array(
            'className' => 'CompanyIndustry',
            'foreignKey' => 'company_industry_id',
            'counterCache' => true,
            'conditions' => '',
            'fields' => '',
            'order' => ''
        ),
        'CompanyType' => array(
            'className' => 'CompanyType',
            'foreignKey' => 'company_type_id',
            'counterCache' => true,
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

    public $hasMany = array(
        'Job' => array(
            'className' => 'Job',
            'foreignKey' => 'company_id',
            'dependent' => true,
            'conditions' => '',
            'fields' => '',
            'order' => '',
            'limit' => '',
            'offset' => '',
            'exclusive' => '',
            'finderQuery' => '',
            'counterQuery' => ''
        )
    );

}
?>